{% extends 'index/index.twig' %}

{% block content_index %}
    <div class="span12 contentcolumn">

        <!-- ** alert message ** -->
            <div class="c-alert pillow-emboss">
                <div class="alert-message danger">
                        <a class="close" href="#"><i class="icon-large icon-remove-circle"></i></a>
                        <p><strong>Hello </strong>Đây là phiên bản thử nghiệm nên còn cùi báp nhé, bà con thông cảm, mình sẽ nâng cấp sau.</a>.</p>
                </div>
            </div>
        <!-- ** ./ alert message ** -->
            
        <!-- Begin main content -->
        <div class="row-fluid">
		    <div class="span12">
		
		        <!-- ** widget ** -->
		        <div class="well">
		
		            <!-- ** widget header ** -->
		            <div class="navbar navbar-heading">
		                <div class="navbar-inner">
		                    <div class="container" style="width: auto;">
		                        <a class="brand" href="#">Add item</a>
		                        <ul class="nav pull-right">
		                                <li><a href="#"><i class="icon-large icon-cog"></i></a></li>
		                        </ul>    
		                    </div>
		                    
		                </div>
		            </div>
		            <!-- ** ./ widget header ** -->

					<!-- Begin message error -->
				    {% if messages %}
					    {% for message in messages %}
			            <div class="alert {% if message == 'success' %} alert-success {% else %} alert-error {% endif %}">
					    	{{ message }}
					    </div>
						{% endfor %}
					{% endif %}
					<!-- End message error -->

		            <form action='' method='post'>
						<table class="table">
							<tr>
								<td>Name:</td>
								<td><input type='text' name='name' value='{{ arrStore.name }}' /></td>
							</tr>
							<tr>
								<td>Code:</td>
								<td><input type='text' name='code' value='{{ arrStore.code }}' /></td>
							</tr>
							<tr>
								<td>Category:</td>
								<td>
									<select name='category_id'>
										<option value=''> -- Choose -- </option>
									{% for cate in category %}
										<option {% if arrStore.category_id == cate.id %} selected='selected' {% endif %} value='{{ cate.id }}'> {{ cate.name }} </option>
									{% endfor %}
									</select>
								</td>
							</tr>
							<tr>
								<td>Price:</td>
								<td><input type='text' name='price' value='{{ arrStore.price }}' /></td>
							</tr>
							<tr>
								<td>Number:</td>
								<td><input type='text' name='number' value='{{ arrStore.number }}' /></td>
							</tr>
							<tr>
								<td>Status:</td>
								<td>
									<select name='status'>
										<option {% if arrStore.status == 1 %} selected='selected' {% else %} selected='' {% endif %} value='1'> On </option>
										<option {% if arrStore.status != 1 %} selected='selected' {% else %} selected='' {% endif %} value='0'> Off </option>
									</select>
								</td>
							</tr>
							<tr>
								<td>Action:</td>
								<td>
									<input type='submit' value='Add' />
									<input type='button' value='Clear' />
								</td>
							</tr>
						</table>
					</form>
		
		        </div>
		        <!-- ** ./ widget ** -->
		
		    </div>
		</div>
    <!-- End main content -->

    </div>
{% endblock content_index %}

{% block leftsidebar %}
{% endblock leftsidebar %}